package com.zzty.txj1.service.impl;

import com.zzty.txj1.dao.AbilityDao;
import com.zzty.txj1.entity.Ability;
import com.zzty.txj1.entity.User;
import com.zzty.txj1.service.AbilityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AbilityServiceImpl implements AbilityService {
    @Autowired
    AbilityDao abilityDao;
    @Override
    public Ability getAbilityById(Ability ability) {
        Ability ability1=abilityDao.getAbilityById(ability);
        return ability1;
    }

    @Override
    public List<Integer> getAllUserId() {
        List<Integer> userIdList=abilityDao.getAllUserId();
        return userIdList;
    }

    @Override
    public void updateAbility(Ability ability) {
        abilityDao.updateAbility(ability);
    }

    @Override
    public Integer addAbility(User User) {
        Integer flog=abilityDao.addAbility(User);
        return flog;
    }

    @Override
    public Ability getAbilityByUserId(User user) {
        Ability ability=abilityDao.getAbilityByUserId(user);
        return ability;
    }
}

